//
//  YHBToastView.m
//  NewPro
//
//  Created by RYX on 2019/6/12.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "YHBToastView.h"

@interface YHBToastView ()


@end

@implementation YHBToastView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        self.layer.cornerRadius = 2;
        self.backgroundColor = UIColor.whiteColor;
        [self setUI];
        
    }
    
    return self;
}

- (void)setUI{
    
    UIImageView *im = [[UIImageView alloc] init];
    im.image = [UIImage imageNamed:@"yhasuccess"];
    [self addSubview:im];
    
    UILabel *title = [[UILabel alloc] init];
    title.textAlignment = NSTextAlignmentCenter;
    title.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:14];
    title.textColor = BLUECOLOR;
    title.text = @"提交成功";
    [self addSubview:title];
    
    UILabel *msg = [[UILabel alloc] init];
    msg.textAlignment = NSTextAlignmentCenter;
    msg.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
    msg.textColor = [UIColor colorWithHexString:@"666666"];
    msg.text = @"请在调整记录里查看审核状态";
    [self addSubview:msg];
    
    [im mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.width.height.mas_equalTo(35);
        make.top.mas_equalTo(10);
    }];
    
    [title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.height.mas_equalTo(14);
        make.top.equalTo(im.mas_bottom).offset(10);
        make.left.right.mas_equalTo(0);
    }];
    
    [msg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.height.mas_equalTo(12);
        make.top.equalTo(title.mas_bottom).offset(14);
        make.left.right.mas_equalTo(0);
    }];
    
}



@end
